<template>
  <div>
    <div class="panel-box" v-if="Object.keys(this.panelInfo).length">
      <img :src="panelInfo.cover" alt />
      <div class="info-box">
        <div class="left">
          <div class="panel-title">{{panelInfo.name}}</div>
          <div class="time">{{panelInfo.start_at}}</div>
        </div>
        <div class="right">
          <img src="@/assets/images/icon_jt.png" alt />
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    panelInfo: {
      type: Object,
      default: () => ({})
    }
  }
}
</script>
<style lang="scss" scoped>
@import "@/styles/mixin.scss";
.panel-box {
  width: 100%;
  height: 5.56rem;
  position: relative;
  overflow: hidden;
  img {
    width: 100%;
  }
  .info-box {
    width: 6.1rem;
    height: 2.67rem;
    background: rgba(255, 255, 255, 1);
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 0 0.5rem;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .left {
      .panel-title {
        width: 4rem;
        font-size: 0.3rem;
        font-family: PingFang SC;
        font-weight: 500;
        color: rgba(0, 4, 0, 1);
        line-height: 0.31rem;
        font-weight: bold;
        margin-bottom: 0.35rem;
        @include ellipsis();
      }
      .time {
        width: 4rem;
        font-size: 0.22rem;
        font-family: PingFang SC;
        font-weight: 400;
        color: rgba(0, 4, 0, 1);
        line-height: 0.32rem;
        @include ellipsis();
      }
    }
    .right {
      width: 0.7rem;
      height: 0.7rem;
      background: rgba(0, 4, 0, 1);
      position: relative;
      img {
        width: 0.4rem;
        @include center();
      }
    }
  }
}
</style>
